package objects {

	/**
	 * @author robertthurston
	 */
	public class Hatch extends AbstractObject {
		[Embed(source="../assets/assets.swf", symbol="Hatch")]
		protected var AssetClass : Class;
		
		private var _size : Number;

		public function Hatch(yOffset : Number)
		{
			super(yOffset);
			trace("NEW HATCH CLASS ", AssetClass);
			_asset = new AssetClass();
			addChild(_asset);
		}
		
		public function set size(laserSize : Number) : void
		{
			_size = laserSize;
			_asset.rotation = 0;
			_asset.width = laserSize;
		}
		
		override public function getCode() : String
		{
			var code : String = "";
			
			code = "[self addHatch:ccp(" + x + "," + (_yOffset - y) + ") size:" + _size + "]";
			
			return code;
		}
	}
}